<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>事件冒泡</title>
    <style>
      #myDiv {
        height: 200px;
        width: 200px;
        background-color: antiquewhite;
      }
    </style>
  </head>
  <body>
    <noscript>抱歉，浏览器不支持JS文件！</noscript>
    <div id="myDiv" onclick="printLog()">点击</div>
    <script>
      function printLog() {
        console.log("div");
      }
    </script>
  </body>
</html>
